package com.parking.admin.action;

import com.sun.deploy.net.HttpResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by hujianjun on 2015/11/9.
 */
@RestController
@RequestMapping("/api/user")
public class LoginController {

    @RequestMapping("/login")
    public int login(String user, HttpServletResponse response) {
        response.addCookie(new Cookie("ueser", user));
        return 0;
    }

}
